//
//  RootViewController.m
//  DoubanDemo1
//
//  Created by lanou3g on 15/11/21.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "RootViewController.h"
#import "ActivityListViewController.h"
#import "MovieListTableViewController.h"
#import "CinemaViewController.h"
#import "UserListViewController.h"
#import "DataHandle.h"
@interface RootViewController ()<dataHandleDelegate>

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    NSLog(@"123123");

    NSLog(@"432432432");

    ActivityListViewController *activityVC = [[ActivityListViewController alloc]init];
    UINavigationController *activityNC = [[UINavigationController alloc]initWithRootViewController:activityVC];
    activityVC.tabBarItem.title = @"活动";
    activityVC.tabBarItem.image = [UIImage imageNamed:@"activity"];
    //secondVC
    MovieListTableViewController *movieVC = [[MovieListTableViewController alloc]init];
    UINavigationController *movieNC = [[UINavigationController alloc]initWithRootViewController:movieVC];
    movieVC.tabBarItem.title = @"电影";
    movieVC.tabBarItem.image = [UIImage imageNamed:@"movie"];
    //thirdVC
    
    CinemaViewController *cinemaVC = [[CinemaViewController alloc]init];
    cinemaVC.tabBarItem.title = @"影院";
    cinemaVC.tabBarItem.image = [UIImage imageNamed:@"cinema.png"];
    
    UserListViewController *mineVC = [[UserListViewController alloc]init];
    mineVC.tabBarItem.title = @"我的";
    mineVC.tabBarItem.image = [UIImage imageNamed:@"user.png"];
    

    UINavigationController *cinemaNC = [[UINavigationController alloc]initWithRootViewController:cinemaVC];
    UINavigationController *mineNC = [[UINavigationController alloc]initWithRootViewController:mineVC];
    [mineNC.navigationBar setBackgroundImage:[UIImage imageNamed:@"bg_nav.png"] forBarMetrics:UIBarMetricsDefault];
    self.viewControllers = [NSArray arrayWithObjects:activityNC,movieNC,cinemaNC,mineNC, nil];
//    [DataHandle sharedInstance].delegtate = self;
    
}

//- (void)reLoad
//{
//    [self.view reloadInputViews];
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
